package com.example.demo.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.example.demo.entify.Role;
import com.example.demo.entify.User;

@Repository

public interface UserDao {
	//登录
	User login(String username,String password);
	int register(User user);
	// 查询
	User isExist1(String username);
	//查询所有工人	
	List<Role> Workers(Integer id);
	//重置密码
	int resetPass(User user);
	//修改密码
	int updatePass(User user);
	//修改工人信息
	int updateWorkers(User user);
	//修改客户信息
	
	int updateCustomer(User user);
	
	int deleteUser(@Param("id") Integer id);

	int deleteByUid(@Param("id") Integer id);
	
	User userPower(@Param("params") Map<String,Object> params);
	
	int updateUserstate(Integer userstate,String username);
	//
	List<User> Users(@Param("params")Map<String,Object> params);
	 
	
}
